import { handleActions } from "redux-actions";
import Immutable from "seamless-immutable";
import * as type from "../types/user";
export const defaultState = Immutable({
  tagColors: {
    // 备用颜色 'magenta','green', 'volcano', 'orange', 'gold', 'lime'
    user: "red",
    ops: "cyan",
    config: "blue",
    demo: "geekblue",
    system: "purple"
  }
});

export default handleActions(
  {
    [type.USER_SET_TAG_COLORS]: (state, action: any) =>
      state.set("tagColors", action.result)
  },
  defaultState
);
